package com.seo.async;

import java.nio.channels.SelectionKey;

public class RegistrationInfo {

	private int options;

	private long lastRead;

	private long lastWrite;

	private Object context;

	public RegistrationInfo() {
	}

	public RegistrationInfo(Object context) {
		this.context = context;
	}

	public int getOptions() {
		return options;
	}

	public void setOptions(int options) {
		this.options = options;
	}

	public Object getContext() {
		return context;
	}

	public void setContext(Object context) {
		this.context = context;
	}

	public long getLastRead() {
		return lastRead;
	}

	public void setLastRead(long lastRead) {
		this.lastRead = lastRead;
	}

	public long getLastWrite() {
		return lastWrite;
	}

	public void setLastWrite(long lastWrite) {
		this.lastWrite = lastWrite;
	}

	public boolean isRegisteredRead() {
		return (options & SelectionKey.OP_READ) != 0;
	}

	public boolean isRegisteredWrite() {
		return (options & SelectionKey.OP_WRITE) != 0;
	}
}
